{% extends 'base.html' %}
{% block title %}
    <a class="navbar-brand" href="#"> 添加部门信息 </a>
{% endblock %}
{% block content %}
<div class="content">
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12">
				<div class="card">
					<form id="allInputsFormValidation" class="form-horizontal"  method="post" >
						<div class="content">
							<h4 class="title">添加部门信息</h4>

							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										部门名称<span style="color:red">*</span>
									</label>
									<div class="col-sm-6">
										<input class="form-control" type="text" name="departmentname" required="required" aria-required="true" autocomplete="off" >
									</div>
								</div>
							</fieldset>
							
							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">部门类型<span style="color:red">*</span></label>
									<div class="col-sm-10" style="margin-top: 10px">
									
											<input type="radio" data-toggle="radio" name="departmenttype" value="部门" checked="">部门

											<input type="radio" data-toggle="radio" name="departmenttype" value="公司">公司
									
									</div>
								</div>
							</fieldset>
							
							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										电话<span style="color:red">*</span>
									</label>
									<div class="col-sm-6">
										<input class="form-control" type="text" name="departmentphone" required="required" aria-required="true" oninput="value = value.replace(/[^\d|xX]/g,'')" maxlength="11" autocomplete="off">
									</div>
								</div>
							</fieldset>
							
							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										传真
									</label>
									<div class="col-sm-6">
										<input class="form-control" type="text" name="departmentfax" oninput="value = value.replace(/[^\d|xX]/g,'')" maxlength="13" autocomplete="off">
									</div>
								</div>
							</fieldset>
							
							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										描述
									</label>
									<div class="col-sm-6">
										<input class="form-control" type="text" name="describe"  autocomplete="off" >
									</div>
								</div>
							</fieldset>
							
							<fieldset>
								<div class="form-group">
									<label class="col-sm-2 control-label">
										上级部门
									</label>
									<div class="form-group">
										<div class="col-sm-6">
											<select class="form-control" name="superior" >
													<option  value=" ">
												{% for departmentname in departmentnames %}

														<option  value="{{ departmentname.departmentname }}">{{ departmentname.departmentname }}</option>

												{% endfor %}
											</select>
										</div>
									</div>
								</div>
							</fieldset>

                            <fieldset>
								<div class="form-group">
                                    <label class="col-sm-2 control-label">成立日期<span style="color:red">*</span></label>
                                    <div class="col-sm-6">

                                        <input type="date" id="date_info_end" name="establish" required="required" aria-required="true"  class="form-control datepicker" autocomplete="off" >
                                    </div>
                                </div>
							</fieldset>

						</div>
						<div class="card-footer text-center">
							<input type="submit"  name="submit" class="btn btn-info btn-fill" value="提交">
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
{% endblock %}